#ifndef  __JX_DEBUG_H_
#define	 __JX_DEBUG_H_

#ifdef	JX_DEBUG_
	#define	JX_DEBUG_EXT	
#else
	#define	JX_DEBUG_EXT	extern
#endif

//打印开关
#if 1
	#define mp_						1
	#define mp_MotionDetect			1
	#define mp_MotionWait			1
	#define mp_AutoFocus			1
	#define mp_SearchPeak			1
	#define mp_ShakeStart			1
	#define mp_Climb				1
	#define mp_GlobalSearch			1
	#define mp_Search3D				1
	#define mp_SearchFine			1
	#define mp_SearchLight			1
	#define mp_ShakeEnd				1
	#define mp_AnalyseScene			1
	#define mp_SearchDirection		1
	#define mp_BackPoint			1
	#define mp_AnalyseDown			1
	#define mp_CheckDown			1
	#define mp_OneFocus				1
	#define mp_FocusPosDirect		1	
	#define mp_GlobalSearchSlow		1
	#define mp_GetStep				1
	#define mp_LightDetect			0

#else
	#define mp_						0
	#define mp_MotionDetect			0
	#define mp_MotionWait			0
	#define mp_AutoFocus			0
	#define mp_SearchPeak			1
	#define mp_ShakeStart			1
	#define mp_Climb				0
	#define mp_GlobalSearch			0
	#define mp_Search3D				0
	#define mp_SearchFine			1
	#define mp_SearchLight			0
	#define mp_ShakeEnd				1
	#define mp_AnalyseScene			0
	#define mp_SearchDirection		0
	#define mp_BackPoint			0
	#define mp_AnalyseDown			0
	#define mp_CheckDown			0
	#define mp_OneFocus				0
	#define mp_FocusPosDirect		0	
	#define mp_GlobalSearchSlow		0
	#define mp_GetStep				0
	#define mp_LightDetect			0

#endif 


#define JX_DBG(format, arg...)        IPZ_ZBC_DEBUG_LogJx(format, ##arg)
#define AF_DBG(format, arg...)        IPZ_ZBC_DEBUG_LogAF(format, ##arg)
#define ZT_DBG(format, arg...)        IPZ_ZBC_DEBUG_LogZoomT(format, ##arg)
#define AE_DBG(format, arg...)        IPZ_ZBC_DEBUG_LogAE(format, ##arg)
#define ICR_DBG(format, arg...)       IPZ_ZBC_DEBUG_LogICR(format, ##arg)
#define ZC_DBG(format, arg...)        IPZ_ZBC_DEBUG_LogZC(format, ##arg)


#if mp_AutoFocus
#define mp_AF(format, arg...) IPZ_ZBC_DEBUG_LogAF(format, ##arg)
#else
#define mp_AF(format, arg...)
#endif

#if mp_
#define mp(format, arg...) IPZ_ZBC_DEBUG_Logmp(format, ##arg)
#else
#define mp(format, arg...)
#endif


#if mp_AnalyseDown
#define mp_AD(format, arg...)   IPZ_ZBC_DEBUG_LogAnalyseDown(format, ##arg)
#else
#define mp_AD(format, arg...)
#endif

#if mp_ShakeStart
#define mp_SS(format, arg...)    IPZ_ZBC_DEBUG_LogShakeStart(format, ##arg)
#else
#define mp_SS(format, arg...)
#endif

#if mp_AnalyseScene
#define mp_AS(format, arg...) 	IPZ_ZBC_DEBUG_LogAnalyseScene(format, ##arg)
#else
#define mp_AS(format, arg...)
#endif

#if mp_SearchLight
#define mp_SL(format, arg...)	 IPZ_ZBC_DEBUG_LogSearchLight(format, ##arg)
#else
#define mp_SL(format, arg...)
#endif

#if mp_Climb
#define mp_C(format, arg...) 	IPZ_ZBC_DEBUG_LogClimb(format, ##arg)
#else
#define mp_C(format, arg...)
#endif

#if mp_ShakeEnd
#define mp_SE(format, arg...) 	IPZ_ZBC_DEBUG_LogShakeEnd(format, ##arg)
#else
#define mp_SE(format, arg...)
#endif

#if mp_SearchFine
#define mp_SF(format, arg...) 	IPZ_ZBC_DEBUG_LogSearchFine(format, ##arg)
#else
#define mp_SF(format, arg...)
#endif

#if mp_SearchPeak
#define mp_SP(format, arg...) 	IPZ_ZBC_DEBUG_LogSearchPeak(format, ##arg)
#else
#define mp_SP(format, arg...)
#endif

#if mp_GlobalSearch
#define mp_GS(format, arg...) 	IPZ_ZBC_DEBUG_LogGlobalSearch(format, ##arg)
#else
#define mp_GS(format, arg...)
#endif

#if mp_SearchDirection
#define mp_SD(format, arg...) 	IPZ_ZBC_DEBUG_LogSearchDirection(format, ##arg)
#else
#define mp_SD(format, arg...)
#endif

#if mp_Search3D
#define mp_S3(format, arg...) 	IPZ_ZBC_DEBUG_LogSearch3D(format, ##arg)
#else
#define mp_S3(format, arg...)
#endif

#if mp_MotionWait
#define mp_MW(format, arg...) 	IPZ_ZBC_DEBUG_LogMotionWait(format, ##arg)
#else
#define mp_MW(format, arg...)
#endif

#if mp_MotionDetect
#define mp_MD(format, arg...) 	IPZ_ZBC_DEBUG_LogMotionDetect(format, ##arg)
#else
#define mp_MD(format, arg...)
#endif

#if mp_FocusPosDirect
#define mp_FPD(format, arg...) 	IPZ_ZBC_DEBUG_LogFocusPosDirect(format, ##arg)
#else
#define mp_FPD(format, arg...)
#endif

#if mp_CheckDown
#define mp_CD(format, arg...) IPZ_ZBC_DEBUG_LogCheckDown(format, ##arg)
#else
#define mp_CD(format, arg...)
#endif

#if mp_BackPoint
#define mp_BP(format, arg...) IPZ_ZBC_DEBUG_LogBackPoint(format, ##arg)
#else
#define mp_BP(format, arg...)
#endif

#if mp_OneFocus
#define mp_WAST(format, arg...) IPZ_ZBC_DEBUG_LogOneFocus(format, ##arg)
#else
#define mp_WAST(format, arg...)
#endif

#if mp_GlobalSearchSlow
#define mp_GSS(format, arg...) IPZ_ZBC_DEBUG_LoGlobalSearchSlow(format, ##arg)
#else
#define mp_GSS(format, arg...)
#endif

#if mp_GetStep
#define mp_GSP(format, arg...) IPZ_ZBC_DEBUG_LoGGetStep(format, ##arg)
#else
#define mp_GSP(format, arg...)
#endif

#if mp_LightDetect 
#define mp_LD(format, arg...) IPZ_ZBC_DEBUG_LoGLightDetect(format, ##arg)
#else
#define mp_LD(format, arg...)
#endif

typedef struct _IPZ_ZBC_DEBUG_FLAGS
{
    SW_INT    	JXDebugFlag;
    SW_INT    	AEDebugFlag;
    SW_INT      AFDebugFlag;
    SW_INT      ZTDebugFlag;
    SW_INT      ICRDebugFlag;
    SW_INT      ZCDebugFlag;

}IPZ_ZBC_DEBUG_FLAGS;

typedef enum __IPZ_ZBC_DEBUG_CMD_FLAGS
{
    DEBUG_CMD_FOCUS = 0,
    DEBUG_CMD_ZOOM,
    DEBUG_CMD_NUM
}IPZ_ZBC_DEBUG_CMD_FLAGS;

void IPZ_ZBC_DEBUG_LogInit(void);
void IPZ_ZBC_DEBUG_SetJXFlag(SW_INT flag);
void IPZ_ZBC_DEBUG_SetAFFlag(SW_INT flag);
void IPZ_ZBC_DEBUG_SetZTFlag(SW_INT flag);
void IPZ_ZBC_DEBUG_SetZCFlag(SW_INT flag);
void IPZ_ZBC_DEBUG_LogPrint(const SW_CHAR *type, const SW_CHAR *format, va_list vlist);
void IPZ_ZBC_DEBUG_LogAE(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogZC(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogICR(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogAF(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogAnalyseDown(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_Logmp(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogShakeStart(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogAnalyseScene(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogSearchLight(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogClimb(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogShakeEnd(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogSearchFine(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogSearchPeak(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogGlobalSearch(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogSearchDirection(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogSearch3D(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogMotionWait(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogMotionDetect(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogFocusPosDirect(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogCheckDown(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogBackPoint(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogOneFocus(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LoGlobalSearchSlow(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LoGGetStep(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LoGLightDetect(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogZoomT(const SW_CHAR *format, ...);
void IPZ_ZBC_DEBUG_LogJx(const SW_CHAR *format, ...);

SW_INT IPZ_ZBC_DEBUG_Cmd(SW_UINT32 cmd0, SW_UINT32 cmd1, SW_UINT32 cmd2, SW_UINT32 cmd3, SW_UINT32 cmd4,SW_UINT32 cmd5);

#endif

